# -*- encoding:UTF-8 -*-
from naoqi import ALProxy

IP = "192.168.8.101"
PORT = 9559


def main():
    maxstepx = 0.02
    maxstepy = 0.03
    maxsteptheta = 0.1
    maxstepfrequency = 0.2
    maxstepheight = 0.05
    torsowx = 0.0
    torsowy = 0.0

    moveConfig = [["MaxStepX", maxstepx],
                  ["MaxStepY", maxstepy],
                  ["MaxStepTheta", maxsteptheta],
                  ["StepHeight", maxstepheight],
                  ["MaxStepFrequency", maxstepfrequency],
                  ["TorsoWx", torsowx],
                  ["TorsoWy", torsowy]]

    motion = ALProxy("ALMotion", IP, PORT)
    # motion.rest()



    tts = ALProxy("ALTextToSpeech", IP, PORT)

    leftArmEnable = False
    rightArmEnable = False
    motion.wakeUp()
    motion.setMoveArmsEnabled(leftArmEnable, rightArmEnable)
    motion.move(0.1, 0.0, 0.0, moveConfig)
    # motion.moveTo(0.5,0.0,0.0)


if __name__ == "__main__":
    main()
